đ Short Summary (1 takeaway)
- Applying some crucial algorithms developed for computer science and math can be applied to real life. These span use cases like decision making, sorting, determining the best, storing information, making guesses, optimize things, think heuristically, how modern technology works
đ§ Why I am reading this book
- Part of [[8. âïž Finer Things Book Club]]
đ Great quotes
Over the past decade or two, behavioral economics has told a very particular story about human beings: that we are irrational and error-prone, owing in large part to the buggy, idiosyncratic hardware of the brain. Look-Then-Leap Rule: You set a predetermined amount of time for âlookingââthat is, exploring your options, gathering dataâin which you categorically donât choose anyone, no matter how impressive. After that point, you enter the âleapâ The math shows that you should always keep playing. But if you follow this strategy, you will eventually lose everything. Some problems are better avoided than solved. Spend the afternoon. You canât take it with you. When balancing favorite experiences and new ones, nothing matters as much as the interval over which we plan to enjoy them. The old adage tells us that âthe grass is always greener on the other side of the fence,â but the math tells us why: the unknown has a chance of being better, even if we actually expect it to be no different, or if itâs just as likely to be worse. Following the advice of these algorithms, you should be excited to meet new people and try new thingsâto assume the best about them, in the absence of evidence to the contrary. Data scientist Jeff Hammerbacher, former manager of the Data group at Facebook, once told Bloomberg Businessweek that âthe best minds of my generation are thinking about how to make people click ads.â In general, it seems that people tend to over-exploreâto favor the new disproportionately over the best. Sorting something that you will never search is a complete waste; searching something you never sorted is merely inefficient. Ironically, in Single Elimination no tournament structure is actually necessary at all. Any 63 games will yield a single undefeated champion. For instance, you could simply have a single âking of the hillâ team take on challengers one by one until it is dethroned, at which point whoever defeated it takes over its spot and continues. As Trick points out, sports leagues arenât concerned with determining the rankings as quickly and expeditiously as possible. Instead, sports calendars are explicitly designed to maintain tension throughout the season, something that has rarely been a concern of sorting theory. In the practical use of our intellect, forgetting is as important a function as remembering. LRU consistently performed the closest to clairvoyance. âtemporal localityâ: if a program has called for a particular piece of information once, itâs likely to do so again in the near future. Unless we have good reason to think otherwise, it seems that our best guide to the future is a mirror image of the past. The nearest thing to clairvoyance is to assume that history repeats itselfâbackward. The key idea behind Andersonâs new account of human memory is that the problem might be not one of storage, but of organization. According to his theory, the mind has essentially infinite capacity for memories, but we have only a finite amount of time in which to search for them. âIf youâre flammable and have legs, you are never blocking a fire exit.â âThe TeX Tuneup of 2014,â in which he fixed all of the bugs that had been reported in his TeX typesetting software over the previous six years. His report ends with the cheery sign-off âStay tuned for The TeX Tuneup of 2021!â Alert me only once every ten minutes, say; then tell me everything. Our days are full of âsmall data.â Perhaps we had already intuited as much, but Bayesâs logic offers us the ability to quantify that intuition. In fact, for any possible drawing of w winning tickets in n attempts, the expectation is simply the number of wins plus one, divided by the number of attempts plus two: (w+1)â(n+2). This incredibly simple scheme for estimating probabilities is known as Laplaceâs Law, and it is easy to apply in any situation where you need to assess the chances of an event based on its history. And the beauty of Laplaceâs Law is that it works equally well whether we have a single data point or millions of them. The mathematical formula that describes this relationship, tying together our previously held ideas and the evidence before our eyes, has come to be knownâironically, as the real heavy lifting was done by Laplaceâas Bayesâs Rule. The Erlang distribution gives us a third kind of prediction rule, the Additive Rule: always predict that things will go on just a constant amount longer. These three very different patterns of optimal predictionâthe Multiplicative, Average, and Additive Rulesâall result directly from applying Bayesâs Rule to the power-law, normal, and Erlang distributions, respectively. In other words, the ability to resist temptation may be, at least in part, a matter of expectations rather than willpower. Failing the marshmallow testâand being less successful in later lifeâmay not be about lacking willpower. It could be a result of believing that adults are not dependable: that they canât be trusted to keep their word, that they disappear for intervals of arbitrary length. Learning self-control is important, but itâs equally important to grow up in an environment where adults are consistently present and trustworthy. you want to be a good intuitive Bayesianâif you want to naturally make good predictions, without having to think about what kind of prediction rule is appropriateâyou need to protect your priors. The lesson is this: it is indeed true that including more factors in a model will always, by definition, make it a better fit for the data we have already. But a better fit for the available data does not necessarily mean a better prediction. Business plans get compressed to an elevator pitch; life advice becomes proverbial wisdom only if it is sufficiently concise and catchy. And anything that needs to be remembered has to pass through the inherent Lasso of memory. When we start designing something, we sketch out ideas with a big, thick Sharpie marker, instead of a ball-point pen. Why? Pen points are too fine. Theyâre too high-resolution. They encourage you to worry about things that you shouldnât worry about yet, like perfecting the shading or whether to use a dotted or dashed line. The first, Constraint Relaxation, simply removes some constraints altogether and makes progress on a looser form of the problem before coming back to reality. The second, Continuous Relaxation, turns discrete or binary choices into continua: when deciding between iced tea and lemonade, first imagine a 50â50 âArnold Palmerâ blend and then round it up or down. The third, Lagrangian Relaxation, turns impossibilities into mere penalties, teaching the art of bending the rules Metropolis named this approachâreplacing exhaustive probability calculations with sample simulationsâthe Monte Carlo Method, Aggregate statistics, on the other hand, are the reverse: comprehensive but thin. As Harvardâs Michael Mitzenmacher puts it, âWhat weâre going to do is come up with an answer which saves you in time and space and trades off this third dimension: error probability.â The river meanders because it canât think. Protocol is how we get on the same page; in fact, the word is rooted in the Greek protokollon, âfirst glue,â which referred to the outer page attached to a book or manuscript. The technology that ate circuit switchingâs lunch would become known as packet switching. In packet switching, on the other hand, the proliferation of paths in a growing network becomes a virtue: there are now that many more ways for data to flow, so the reliability of the network increases exponentially with its size. The way that ACKs work is both simple and clever. Behind the scenes of the triple handshake, each machine provides the other with a kind of serial numberâand itâs understood that every packet sent after that will increment those serial numbers by one each time, like checks in a checkbook. Real-time voice communications, such as Skype, typically do not use TCP, if you lose a packet, you just say, âSay that again, I missed something.ââ In one of the seminal results in game theory, the mathematician John Nash proved in 1951 that every two-player game has at least one equilibrium. In a game-theory context, knowing that an equilibrium exists doesnât actually tell us what it isâor how to get there. In fact, this makes defection not merely the equilibrium strategy but whatâs known as a dominant strategy. A dominant strategy avoids recursion altogether, by being the best response to all of your opponentâs possible strategiesâso you donât even need to trouble yourself getting inside their head at all. A dominant strategy is a powerful thing. The price of anarchy measures the gap between cooperation (a centrally designed or coordinated solution) and competition (where each participant is independently trying to maximize the outcome for themselves). Whenever you find yourself on the side of the majority, it is time to pause and reflect. Here game theory offers a sobering perspective: catastrophes like this can happen even when no oneâs at fault. Dutch auctions are more prevalent than they might initially seem. A store marking down its unsold items, and landlords listing apartments at the highest price they think the market will bear, both share its basic quality: the seller is likely to begin optimistically and nudge the price down until a buyer is found. In an English auction, bidders alternate raising the price until all but one of them drop out. This seems to offer something closer to what we want: here, if you value an item at 10, youâll win it for just over 25 or disappearing down the strategic rabbit hole. However, in a Vickrey auction, the winner ends up paying not the amount of their own bid, but that of the second-place bidder. That is to say, if you bid 10, you win the item at my price: you only have to pay $10. In a Vickrey auction, on the other hand, honesty is the dominant strategy. This is the mechanism designerâs holy grail. You do not need to strategize or recurse. In a landmark finding called the ârevelation principle,â Nobel laureate Roger Myerson proved that any game that requires strategically masking the truth can be transformed into a game that requires nothing but simple honesty. The 37% Rule, the Least Recently Used criterion for handling overflowing caches, and the Upper Confidence Bound as a guide to exploration are all examples of this. Even the best strategy sometimes yields bad resultsâwhich is why computer scientists take care to distinguish between âprocessâ and âoutcome.â If you followed the best possible process, then youâve done all you can, and you shouldnât blame yourself if things didnât go your way. Call it a kind of computational Stoicism. If you wind up stuck in an intractable scenario, remember that heuristics, approximations, and strategic use of randomness can help you find workable solutions. sometimes âgood enoughâ really is good enough. Whatâs more, being aware of complexity can help us pick our problems: These arenât the concessions we make when we canât be rational. Theyâre what being rational means.
â Actionable item
- [ ]